﻿using BaiTu.MessageServicesEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaiTu.IMessageServices
{
    /// <summary>
    /// 消息 接口 定义
    /// </summary>
    public interface IMessage : IHasID<Guid>
    {
        /// <summary>
        /// 创建时间
        /// </summary>
        DateTime CreateDate { get; }
        /// <summary>
        /// 权重
        /// </summary>
        long Priority { get; set; }
        /// <summary>
        /// 尝试次数
        /// </summary>
        int RetryAttempts { get; set; }
        Guid? ReplyId { get; set; }

        string ReplyTo { get; set; }

        int Options { get; set; }

        ResponseStatus Error { get; set; }

        string Tag { get; set; }

        object Body { get; set; }
    }
    public interface IMessage<T> : IMessage
    {
        T GetBody();
    }
}
